<template>
	<view :style="{'background-color':bgcolor}" class="searchContainer">
		<view @click="clickSearch" :style="{'border-radius':radius+'px'}" class="searchItem">
			<uni-icons type="search"></uni-icons>
			<text class="searchText">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"search",
		data() {
			return {
				
			};
		},
		props:{
			// 背景颜色
			bgcolor:{
				typeof:String,
				default:'#c00000'
			},
			// 圆角尺寸
			radius:{
				typeof:Number,
				// 单位为px
				default: 18
			}
		},
		methods:{
			clickSearch(){
				this.$emit("search")
			}
		}
	}
</script>

<style lang="scss">
.searchContainer{
	height: 50px;
	padding: 0 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	.searchItem{
		height: 36px;
		background-color: #fff;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		.searchText{
			font-size: 15px;
			margin-left: 5px;
		}
	}
}

</style>